﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sinacor.Infra.Service.Security.Services;
using Sinacor.Servico.Bovespa.Calendario.Service.ServiceContract;

namespace Sinacor.Servico.Bovespa.Calendario.Service.ServiceImplementation
{
    [SinacorServiceBehavior]
    public class CalendarioBolsa : ICalendarioBolsa
    {
        #region ICalendarioBolsa Members

        public List<DataContract.Response.CalendarioResponse> ConsultarCalendarios(DataContract.Request.FiltroCalendarioRequest request)
        {
            Translator.BusinessEntityToDataContract.CalendarioBolsa translatorResponse = new Translator.BusinessEntityToDataContract.CalendarioBolsa();
            Translator.DataContractToBusinessEntity.CalendarioBolsa translatorRequest = new Translator.DataContractToBusinessEntity.CalendarioBolsa();
            BusinessLogic.CalendarioBolsa buCalendario = new BusinessLogic.CalendarioBolsa();
            return translatorResponse.ToCalendarioResponse(buCalendario.ConsultarCalendarios(translatorRequest.ToFiltroCalendario(request)));
        }

        #endregion
    }
}
